package com.dingzhen.service;

import com.dingzhen.entity.Topic;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author dingzhen
 */
@Service
public class EatService {

    @Resource
    private ServiceFactory serviceFactory;

    public String eat(Topic topic) {
        return serviceFactory.getService(topic.getCode())
                .handler(topic);
    }
}
